﻿
//生成[Friendly]Service代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FineAdmin.IService;
using FineAdmin.Model;
using FineAdmin.IRepository;
using FineAdmin.Common;

namespace FineAdmin.Service
{
    public class FriendlyService : BaseService<FriendlyModel>, IFriendlyService
    {
        public IFriendlyRepository FriendlyRepository { get; set; }
        public IEnumerable<FriendlyModel> GetFriendlyList()
        {
            return FriendlyRepository.GetFriendlyList();
        }


        public dynamic GetListByFilter(FriendlyModel filter, PageInfo pageInfo)
        {
            string _where = " where 1=1";
            if (filter.State.HasValue) {

                _where += " and State ="+ filter.State.Value;
            }
            return GetListByFilter(filter, pageInfo, _where);
        }

    }

}